export const getTerminal = () => {
    const userAgent = navigator.userAgent.toLowerCase()
    
    const info = {
      ipad: /ipad/.test(userAgent),
      phone: /iphone/.test(userAgent) || /android/.test(userAgent),
      weixin: /micromessenger/.test(userAgent),
      qqnews: userAgent.match(/qqnews/i),
      windows: /windows/.test(userAgent)
    }

    return (Object.entries(info).find(item => item[1]))![0]
}

